#include "RenderSystem.h"

GLOBAL_NAMESPACE_BEGIN

template<> RenderSystem* Singleton<RenderSystem>::singleton_ = 0;

RenderSystem::RenderSystem()
    : meshRenderer_(NULL)
    , pcRenderer_(NULL)
{}

RenderSystem::~RenderSystem()
{
    destroy();
}

void RenderSystem::init()
{
    // do something here..
    meshRenderer_ = new MeshRenderer();
    pcRenderer_ = new PointCloudRenderer();
}

void RenderSystem::destroy()
{
    if (meshRenderer_) delete meshRenderer_;
    meshRenderer_ = NULL;
    if (pcRenderer_) delete pcRenderer_;
    pcRenderer_ = NULL;
}

GLOBAL_NAMESPACE_END
